<#assign script_controller = 'group/group'/>
<#assign sideNav = 'group'/>

<@block_title '创建小组'/>

<#include '/layout.ftl'>

<#macro blockContent>
<div class="panel panel-default panel-lg">
    <div class="panel-heading"><h1>创建小组</h1></div>
    <div class="panel-body">
        <form id="user-group-form" class="form-horizontal" method="post" action="${ctx}/group/add">
            <@web_macro.flash_messages/>

            <div class="form-group">
                <label class="col-md-2 control-label" for="group_grouptitle">小组名称</label>
                <div class="col-md-7 controls">
                    <input type="text" id="group_grouptitle" name="group[grouptitle]" class="form-control"
                    >
                    <div class="help-block" style="display:none;"></div>
                </div>
            </div>

            <div class="form-group">
                <label class="col-md-2 control-label" for="group_about">小组介绍</label>
                <div class="col-md-7 controls">
                    <textarea name="group[about]" rows="10" id="group" class="form-control" data-image-upload-url="${ctx}/editor/upload?token=upload_token('default')"></textarea>
                </div>
            </div>

            <div class="row">
                <div class="col-md-7 col-md-offset-2">
                    <button id="group-save-btn" data-submiting-text="正在创建" type="submit" class="btn btn-primary">创建</button>
                </div>
            </div>
            <input type="hidden" name="_csrf_token" value="${csrf_token('site')}">
        </form>
    </div>
</div>

</#macro>